import { Component } from "@angular/core";
import { NavController, NavParams, AlertController } from "ionic-angular";
import { HttpService } from "../../../providers/http.service";
import { CommonFunc } from "../../../providers/commonFunc";
import { Storage } from "@ionic/storage";
import { SafeControlPage } from "../safe-control/safe-control";
import * as moment from "moment";
/**
 * 检查结果明细
 */
@Component({
  templateUrl: "record-check-detail.html"
})
export class RecordCheckDtPage {
  check = "0";
  list: any = [];
  checkTimeFrom: any;
  constructor(
    public navCtrl: NavController,
    private alertCtrl: AlertController,
    private httpService: HttpService,
    private navParams: NavParams,
    private commonFunc: CommonFunc,
    private storage: Storage
  ) {
    this.checkTimeFrom = moment(new Date()).format("YYYYMMDDHHmmss");
    if (this.navParams.get("id")) {
      this.httpService
        .queryCheckResult({ scrid: this.navParams.get("id") })
        .subscribe(data => {
          if (data.status == "200") {
            this.list = data.data.list;
          }
        });
    }
  }


}
